<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>less嵌套</title>
    <link rel="stylesheet" href="my.css">
</head>
<body>
   
    <div class="main">
        <p>子元素样式可以直接写到父元素样式里面，如果有伪类，交集选择器和伪元素选择器则需要在前面加&</p>
        <span>a{
            &:hover{
    
            }
        }</span>
        <div class="title">
            123
        </div>
    </div>
</body>
</html>